<template>
  <view>
    <uni-search-bar bgColor="#040f25" :value="searchValue" :placeholder="'请输入'+text" @input='input' @confirm="search"
      :radius="100" cancelButton="none" style="margin: 69rpx 34rpx 0 37rpx;"></uni-search-bar>
  </view>
</template>

<script>
  export default {
    name: "search",
    props: ['text'],
    data() {
      return {
        searchValue: null
      };
    },
    methods: {
      search() {
        console.log(this.searchValue);
        // console.log('1213');
      },
      input(e) {

        clearTimeout(time)
        let time = setTimeout(() => {
          this.searchValue = e
        }, 1000)

        // console.log(e, '搜索的值');
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>